<template>
	<view class="empire-price">
		<view class="empire-price__box">
			<text class="empire-mall__price">¥ {{ discount }}</text>
			<text v-if="price" class="empire-mall__origin-price">¥ {{ price }}</text>
		</view>
		<view class="empire-price__plus">
			<uni-number-box v-if="showNumberInput" :value="number"></uni-number-box>
		</view>
	</view>
</template>

<script setup>
defineProps({
	// 折扣价
	discount: {
		type: Number,
		default: undefined
	},
	// 原价
	price: {
		type: Number,
		default: undefined
	},
	showNumberInput: {
		type: Boolean,
		default: false
	},
	number: {
		type: Number,
		default: 0
	}
});
</script>

<style lang="scss" scoped>
.empire-price {
	display: inline-flex;
	justify-content: space-between;
	align-items: center;
}
.empire-price__box {
	display: flex;
}
.empire-mall__price + .empire-mall__origin-price {
	margin-left: 24rpx;
}
.empire-price__plus {
	display: flex;
	align-items: center;
}
</style>
